import request from '@/utils/request'

// 查询人员成绩列表
export function listDetails(query) {
  return request({
    url: '/ability/details/list',
    method: 'get',
    params: query
  })
}

// 查询考试详情详细-回显接口
export function getDetails(detailsId) {
  return request({
    url: '/ability/details/' + detailsId,
    method: 'get'
  })
}

// 查询人员列表
export function UsersList(deptId){
  //console.log("部门ID"+deptId);
  if(deptId == undefined){
    deptId = 0;
  }
  return request({
    url:'/beiben/system/user/dept/'+deptId,
    method:'get'
  })
}


// 查询未录入人员信息
export function getUsers(recordId,deptId){
  console.log("------recordId---"+recordId+"---"+deptId);
  var data = {
    "recordId":recordId,
    "deptId":deptId
  }
  return request({
    url:'/ability/details/users/',
    method:'post',
    data: data
  })
}


// 新增考试详情
export function addDetails(data) {
  return request({
    url: '/ability/details',
    method: 'post',
    data: data
  })
}

// 修改考试详情
export function updateDetails(data) {
  return request({
    url: '/ability/details',
    method: 'put',
    data: data
  })
}

// 删除考试详情
export function delDetails(detailsId) {
  return request({
    url: '/ability/details/' + detailsId,
    method: 'delete'
  })
}

// 导出考试详情
export function exportDetails(query) {
  return request({
    url: '/ability/details/export',
    method: 'get',
    params: query
  })
}

// 获取科室列表
export function getDeptUser(deptId) {
  deptId = 0;
  return request({
    url: '/beiben/system/user/dept/'+deptId,
    method: 'get',
  })
}